package org.jeecg.modules.business.enums;

import org.jeecg.common.system.vo.DictModel;

import java.util.ArrayList;
import java.util.List;

public enum FeeSubjectType {

    YA_JIN(1,"押金"),
    YU_SHOU(2,"预收房费"),
    MEI_RI_FANG_FEI(3,"每日房费"),
    YOU_HUI(4,"优惠金额"),
    JIE_ZHANG(5,"结账收款"),
    SHANG_PIN(6,"商品"),
    DIAN_PIN(7,"点餐"),
    YE_SHEN_FANG_FEI(8,"夜审房费"),
    HUI_YI_SHI(9,"会议室"),
    SHOU_GONG_FANG_FEI(10,"手工房费"),
    SHUI_DIAN_MEI(11,"水电煤抄表"),
    PEI_CHANG(12,"赔偿费"),
    TUI_DAN_JIE_ZHANG_SHOU_KUAN(13,"退单结账"),
    OTHER(14,"其他");

    Integer key;

    String title;

    FeeSubjectType(Integer key, String title){
        this.key = key;
        this.title = title;
    }
    public Integer getKey() {
        return key;
    }

    public String getTitle() {
        return title;
    }

    /**
     * 获取字典数据
     * @return
     */
    public static List<DictModel> getDictList(){
        List<DictModel> list = new ArrayList<>();
        DictModel dictModel = null;
        for(CouponsEventEnum e: CouponsEventEnum.values()){
            dictModel = new DictModel();
            dictModel.setValue(e.key.toString());
            dictModel.setText(e.title);
            list.add(dictModel);
        }
        return list;
    }

    public static FeeSubjectType val(Integer key){
        for(FeeSubjectType bld: values()){
            if(bld.key .equals(key)){
                return bld;
            }
        }
        return null;
    }
}
